
#ifndef __CCAMERA_H
#define __CCAMERA_H

#include "stdafx.h"

#define LEFT 350
#define TOP 400
#define RIGHT 350
#define BOTTOM 200
#define PANRATE 200

class CPlayer;
class CCamera
{
private:
	vector<POINT> waterspawns;
	CPlayer* m_pPlayer;
	int index;
	float m_fPosX;
	float m_fPosY;
	float m_fWidth;
	float m_fHeight;
	float m_fOffset;
	float m_fSpeed;
	bool m_bPanning;
	bool m_bPlayerMode;
	bool m_bFoundPoint;

	CCamera();
	~CCamera();
	CCamera(const CCamera& camera);
	CCamera& operator =(const CCamera& camera);

public:
	static CCamera* GetInstance();

	void Update();

	float GetPosX()	{return m_fPosX;}
	float GetPosY() {return m_fPosY;}
	float GetWidth() {return m_fWidth;}
	float GetHeight() {return m_fHeight;}
	bool GetPlayerMode() { return m_bPlayerMode;}

	void SetPosX(float fPosX) {m_fPosX = fPosX;}
	void SetPosY(float fPosY) {m_fPosY = fPosY;}
	void SetWidth(float fWidth) {m_fWidth = fWidth;}
	void SetHeight(float fHeight) {m_fHeight = fHeight;}
	void SetPlayer(CPlayer* pPlayer) {m_pPlayer = pPlayer;}
	void SetPanning(bool bPanning) {m_bPanning = bPanning;}
	void SetMode(bool playermode) {m_bPlayerMode = playermode;}
	void ResetCamera();
	//void PanCameraUp();
	//void PanCameraDown();
	bool GoToPoint(POINT p);
	void AddPoint(POINT p);
	bool IsOnCamera(float nPosX, float nPosY);
};

#endif